import React from "react";

const Home=React.lazy(()=>import('../page/Home'))
const Login=React.lazy(()=>import('../page/Login'))

const Main=React.lazy(()=>import('../page/Home/Main'))
const Management=React.lazy(()=>import('../page/Home/Management'))

const childRoute=[{
    path:'/home/main',
    name:'系统主页',
    element:<Main/>
},{
    path:'/home/management',
    name:'系统管理',
    element:<Management/>
}]

const routes=[{
    path:'/home',
    name:'主页',
    element:<Home/>,
    children:childRoute
},{
    path:'/login',
    name:'登录',
    element:<Login/>
},{
    from:'/',
    to:'/home/main'
}]

export default routes